package com.example.demo.utils;
import com.github.pagehelper.PageInfo;
import com.example.demo.utils.PageResult;
public class PageUtils {
    public static PageResult getPageResult(PageInfo<?> pageInfo){
        PageResult pageResult = new PageResult();
        pageResult.setPageNum(pageInfo.getPageNum());
        pageResult.setPageSize(pageInfo.getPageSize());
        pageResult.setTotalpage(pageInfo.getPages());
        pageResult.setTotalsize(pageInfo.getTotal());
        pageResult.setRows(pageInfo.getList());
        return pageResult;
    }
}
